package com.atguigu.tingshu.album.service.impl;

import com.atguigu.tingshu.album.mapper.AlbumInfoMapper;
import com.atguigu.tingshu.album.mapper.AlbumStatMapper;
import com.atguigu.tingshu.album.service.AlbumInfoService;
import com.atguigu.tingshu.album.service.AlbumStatService;
import com.atguigu.tingshu.common.cache.TsCache;
import com.atguigu.tingshu.model.album.AlbumInfo;
import com.atguigu.tingshu.model.album.AlbumStat;
import com.atguigu.tingshu.vo.album.AlbumStatVo;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AlbumStatServiceImpl extends ServiceImpl<AlbumStatMapper, AlbumStat> implements AlbumStatService {

    @Autowired
    private AlbumStatMapper albumStatMapper;

    /**
     * @author WeakMoon
     * @date 2025/02/26 20:19:23
     * 根据专辑id查找专辑属性值
     */
    @Override
    @TsCache(prefix = "statvo:")
    public AlbumStatVo getStat(long albumId) {
        return albumStatMapper.getStat(albumId);
    }
}
